namespace CSharpPro._1030;

public class Student:Son
{
    private String studentName = "studentName";
    public Student(){}

    public Student(String studentName)
    {
        this.studentName = studentName;
    }

    public String StudentName
    {
        get => studentName;
        set => studentName = value ?? throw new ArgumentNullException(nameof(value));
    }

    public void Deconstruct()
    {
        Console.WriteLine("student Deconstruct");
    }

    ~Student()
    {
        Console.WriteLine("student已销毁");
    }

    public override void Print2()
    {
        Console.WriteLine("Student Print2");
    }
}